package com.fac.dto;

import com.fac.constant.EquipmentStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ApiModel(description = "设备分页查询参数")
public class EquipmentPageQueryDTO implements Serializable {

    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码必须大于0")
    @ApiModelProperty(value = "页码", required = true, example = "1")
    private Integer page = 1;

    @NotNull(message = "每页显示记录数不能为空")
    @Min(value = 1, message = "每页显示记录数必须大于0")
    @ApiModelProperty(value = "每页显示记录数", required = true, example = "10")
    private Integer size = 10;

    @ApiModelProperty(value = "查询关键字(设备名称或编码)", example = "数控车床")
    private String keyword;

    @ApiModelProperty(value = "分类ID", example = "1")
    private Long categoryId;

    @ApiModelProperty(value = "设备状态", example = "IDLE", allowableValues = "IDLE,IN_USE,UNDER_REPAIR,SCRAPPED")
    private EquipmentStatus status;
} 